% Copyright 2016 Bassam Alrifaee
% 
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License version 3 as 
% published by the Free Software Foundation.
% 
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.

% Returns a list of predefined scenarios.
function [ list ] = list_scenarios
    list = {...
        'Frogger', @froggerScenario; ...
        
        'Circle 02', @() circleScenario(pi*(1:2)); ...
        'Circle 03', @() circleScenario(2*pi/3*(1:3)); ...
        'Circle 04', @() circleScenario(2*pi/4*(1:4)); ...
        'Circle 05', @() circleScenario(2*pi/5*(1:5)); ...
        'Circle 06', @() circleScenario(2*pi/6*(1:6)); ...
        'Circle 07', @() circleScenario(2*pi/7*(1:7)); ...
        'Circle 08', @() circleScenario(2*pi/8*(1:8)); ... 
        
        'Parallel 01', @()parallelScenario(1); ...
        'Parallel 02', @()parallelScenario(2); ...
        'Parallel 03', @()parallelScenario(3); ...
        'Parallel 04', @()parallelScenario(4); ...
        'Parallel 05', @()parallelScenario(5); ...
        'Parallel 06', @()parallelScenario(6); ...
        'Parallel 07', @()parallelScenario(7); ...
        'Parallel 08', @()parallelScenario(8); ...
        'Parallel 09', @()parallelScenario(9); ...
        'Parallel 10', @()parallelScenario(10); ...
        'Parallel 11', @()parallelScenario(11); ...
        'Parallel 12', @()parallelScenario(12); ...
    };

    % add names
    for i = 1:size(list,1)
        list{i,2} = @() appendName(list{i,2},list{i,1});
    end
end

function scenario = appendName(scenarioConstructor,name)
    scenario = scenarioConstructor();
    scenario.Name = name;
end